
function showWorkingIndicator(data) {

    showIndicatorRegion(data, "workingIndicator");
}

function showIndicatorRegion(data, regionId) {
    if (data.status == "begin") {
        showElement(regionId);
    } else if (data.status == "success" ) {
        if (data.responseText.toString().indexOf('ajaxSearchDiv', 0)>-1){
            hideElement(regionId);
        }else {
            window.location.href='timeout.xhtml';
        }
    } else if (data.status == 'failure') {
        alert('mööööp');
    }
}

function showElement(id) {
    document.getElementById(id).style.display
    = "inline";
}

function hideElement(id) {
    document.getElementById(id).style.display
    = "none";
}

